package com.itheima.reggie.service.impl;

import com.itheima.reggie.entity.OrderDetail;
import com.itheima.reggie.mapper.OrderDetailMapper;
import com.itheima.reggie.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Transactional
@Service
public class OrderDetailServiceImpl implements OrderDetailService {
    
    @Autowired
    private OrderDetailMapper mapper;
    
    /**
     * 添加订单详情对象
     *
     * @param orderDetail
     * @return
     */
    @Override
    public int add(OrderDetail orderDetail) {
        return mapper.insert(orderDetail);
    }
}
